import request from '@/utils/request'
const baseUrl = process.env.VUE_APP_TMS_CONSOLE_HOST
// 司机列表
export function driverList(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-driver/search`,
    method: 'post',
    data
  })
}

// 司机详情
export function driverDetail(id) {
  return request({
    url: `${baseUrl}/api/v1/tms-driver/${id}`,
    method: 'get'
  })
}

// 审核通过
export function driverAudit(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-driver/review`,
    method: 'post',
    data: data
  })
}

// 新增司机
export function driverAdd(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-driver/add`,
    method: 'post',
    data: data
  })
}

//
export function getDriverAndCarList(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-driver/associate-car-search`,
    method: 'post',
    data: data
  })
}

// 删除司机与车辆关系
export function delDriverAndCar(data) {
  return request({
    url: `${baseUrl}/api/v1/tms-driver/delete/driver-car`,
    method: 'post',
    data: data
  })
}
